// rollup.config.js
import json from 'rollup-plugin-json';
import resolve from 'rollup-plugin-node-resolve';
import commonjs from 'rollup-plugin-commonjs';
import buble from "@rollup/plugin-buble";
import { terser } from "rollup-plugin-terser";
import typescript from 'rollup-plugin-typescript';

export default {
    input: 'src/index.ts',
    output: [
        {
            file: 'es/index.js',
            format: 'cjs'
        },
        {
            file: 'lib/index.js',
            format: 'umd',
            name: "TrialTool"
          }
    ],
    plugins: [
        json(),
        resolve(),
        commonjs(),
        typescript(),
        buble({
            objectAssign: "Object.assign",
        }),
        terser()
    ]
};
